home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / appwindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-08  |  3.1 KB  |  63 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AAppWindow wrapper class                                                  *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_AppWindow_H
  12. #define ASAP_AppWindow_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/WB.h>
  19. }
  20.  
  21. class AAppWindow : public AppWindow
  22. {
  23.  public:
  24.  inline static AAppWindow * AddAppWindow(unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, Tag tag1,  ...);
  25.  inline void * operator new(size_t, unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, Tag tag1,  ...);
  26.  inline static AAppWindow * AddAppWindowA(unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, struct TagItem * taglist);
  27.  inline void * operator new(size_t, unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, struct TagItem * taglist);
  28.  inline BOOL RemoveAppWindow();
  29.  inline void operator delete (void *);
  30. };
  31. //----------------------------------------------------------------------------
  32. AAppWindow * AAppWindow::AddAppWindow (unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, Tag tag1,  ...)
  33. {
  34.  return AAppWindow::AddAppWindowA(id, userdata, window, msgport, (TagItem *) tag1);
  35. }
  36. //----------------------------------------------------------------------------
  37. void * AAppWindow::operator new (size_t, unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, Tag tag1,  ...)
  38. {
  39.  return AAppWindow::AddAppWindowA(id, userdata, window, msgport, (TagItem *) tag1);
  40. }
  41. //----------------------------------------------------------------------------
  42. AAppWindow * AAppWindow::AddAppWindowA (unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, struct TagItem * taglist)
  43. {
  44.  return (AAppWindow *) ::AddAppWindowA(id, userdata, window, msgport, taglist);
  45. }
  46. //----------------------------------------------------------------------------
  47. void * AAppWindow::operator new (size_t, unsigned long id, unsigned long userdata, struct Window * window, struct MsgPort * msgport, struct TagItem * taglist)
  48. {
  49.  return AAppWindow::AddAppWindowA(id, userdata, window, msgport, taglist);
  50. }
  51. //----------------------------------------------------------------------------
  52. BOOL AAppWindow::RemoveAppWindow ()
  53. {
  54.  return ::RemoveAppWindow(this);
  55. }
  56. //----------------------------------------------------------------------------
  57. void AAppWindow::operator delete (void *appWindow)
  58. {
  59.  ((AAppWindow *) appWindow)->RemoveAppWindow();
  60. }
  61.  
  62. #endif
  63.